<template>
    <div>

        <a href="/AddUser">新增会员</a>
        <h1>会员列表</h1>
        <table>
           <thead>
            <tr>
                
                <td>姓名</td>
                <td>手机号</td>
                <td>创建时间</td>
                <td>状态</td>
            </tr>
           </thead>
           <tbody>
            <tr v-for="a in data">
               
                <td>{{a.name}}</td>
                <td>{{a.phone}}</td>
                <td>{{ a.ctime }}</td>
                <td>{{a.stata}}</td>
            </tr>
           </tbody>
        </table>

    </div>
</template>

<script setup lang="ts">

import { ref,onMounted } from 'vue'
import axios from 'axios'

//model
const data=ref([{
    "id": 0,
  "name": "",
  "phone": "",
  "ctime": "2025-03-23T13:05:21.141Z",
  "stata": true
  }]);

const getdata=()=>{
    //axios.get("",{params:{}}).then(res=>{})
    axios.get("https://localhost:7176/api/User/GetAll").then(res=>{
        data.value = res.data;
    })
}


onMounted(()=>{
    getdata()
})


</script>

<style scoped>

</style>